home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Die Speccy' 97
/
Die Speccy' 97.iso
/
amiga_system
/
the_aminet
/
comm
/
cnet
/
cnet_who.lha
/
Convert_21_251
< prev
next >
Wrap
Text File
|
1995-10-15
|
6KB
|
115 lines
/**************************************************************************\
$VER: CNet WHO Convert, v2.51 (15-Oct-95) by Dotoran!
\**************************************************************************/
options results ; signal on SYNTAX ; signal on ERROR ; signal on IOERR
tr=transmit ; se=sendstring ; gc=getchar ; gu=getuser ; gs=getscratch
a='rexxsupport.library';if ~show('l',a) then if ~addlib(a,0,-30) then exit
CONVERT:
tr "f1Convert CNet WHO, v2.1(c/d) into CNet WHO, v2.51n1@4"
if ~exists("pfiles:who/glimpses") then do
tr "The conversion process has already been completed!";exit;end
se "This file only makes changes needed for the data files to upgrade to "
se "v2.51 CNet WHO, however you should STILL READ the Convert_README! "
se "file for more steps in the conversion process. Press any key to begin "
se "this portion of the conversion process...<Key>g1Thanks!n1"
call open(f1,"pfiles:who/config.data","r")
do i=1 until eof(f1) ; l.i=readln(f1) ; end i ; tot=i-1
call close(f1)
if tot<12 then do
se "Uh-Oh, there are LESS THAN 12 lines in your Config.data file! This "
se "could mean that the file is corrupt, or that you may be using a "
se "version of CNet Who PREVIOUS to v2.1. You will need to completely "
se "purge your system of whatever version you are presently running, "
se "then follow the procedures outlined in the WHO_README! file for "
tr "installing this mod for the first time.";exit;end
if tot=12 then do ; call BBSTEXT
se "Running v2.1 CNet Who...updating Config.data file..."
l.0=l107''l903''l1066''fake''l5''l4'x'
parse var l.4 v1''v2''v3''v4''v5''v6''v7''v8''v9''j
l.4=v1''v2''v3''v4''v5''v6''v7''v8''v9'10x'
parse var l.8 v1''v2''v3''v4''v5''v6''v7''v8''v9''j
l.8=v1''v2''v3''v4''v5''v6''v7''v8''v9'10x'
parse var l.12 v1''v2''v3''v4''v5''v6''v7''v8''v9''j
l.12=v1''v2''v3''v4''v5''v6''v7''v8''v9'10x'
tr "done.";end
if tot=13 then do ; call BBSTEXT
se "Running v2.1c or v2.1d CNet Who...updating Config.data file..."
l.1=l107''l903''l1066''fake''l5''l4'x'
parse var l.5 v1''v2''v3''v4''v5''v6''v7''v8''v9''j
l.5=v1''v2''v3''v4''v5''v6''v7''v8''v9'10x'
parse var l.9 v1''v2''v3''v4''v5''v6''v7''v8''v9''j
l.9=v1''v2''v3''v4''v5''v6''v7''v8''v9'10x'
parse var l.13 v1''v2''v3''v4''v5''v6''v7''v8''v9''j
l.13=v1''v2''v3''v4''v5''v6''v7''v8''v9'10x'
tr "done.";end
se "n1Saving updated Config.data file..."
call open(f1,"pfiles:who/Config.data","w")
lo=1 ; hi=13 ; if tot=12 then do ; lo=0 ; hi=12 ; end
do i=lo to hi ; call writeln(f1,l.i) ; end i
call close(f1) ; tr "done.n1"
tr "Assembling UUCP Directories from Serial ID Numbers:n1"
gu 2400088 ; acts=result ; mdir.="" ; do i=1 to acts
loadscratch i ; st=result ; savescratch (-i) ; getscratch 1 ; han=result
se right(i,4,"0")right(han,22,".")":"
if st<1|han="!" then do ; tr " Deleted Account!";iterate i;end
getscratch 41 ; sid=result ; getscratch 39 ; uucp=result
mdir.sid="mail:users/"uucp"/" ; tr right(sid,4)" = "mdir.sid
end i
GLIMPSES:
tr "n1Moving existing Glimpse files into appropriate UUCP Directories:n1"
a=showdir("pfiles:who/glimpses/",," ")
if a="" then do ; tr "No Glimpse files found!" ; signal BANNERS ; end
do i=1 to words(a) ; z=word(a,i) ; zz=mdir.z ; if zz="" then do
tr "Serial ID Number `"z"' no longer in use; skipping." ; iterate i ; end
tr "Copying `"z"' as `"zz"_Glimpse' file."
address command "copy pfiles:who/glimpses/"z" "zz"_Glimpse"
end i
BANNERS:
tr "n1Moving existing Banners files into appropriate UUCP Directories:n1"
a=showdir("pfiles:who/banners/",," ")
if a="" then do ; tr "No Banners files found!" ; signal HISTORIES ; end
do i=1 to words(a) ; z=word(a,i) ; zz=mdir.z ; if zz="" then do
tr "Serial ID Number `"z"' no longer in use; skipping." ; iterate i ; end
tr "Copying `"z"' as `"zz"_Banners' file."
address command "copy pfiles:who/banners/"z" "zz"_Banners"
end i
HISTORIES:
tr "n1Moving existing History files into appropriate UUCP Directories:n1"
a=showdir("pfiles:who/histories/",," ")
if a="" then do ; tr "No History files found!" ; signal DONE ; end
do i=1 to words(a) ; z=word(a,i) ; zz=mdir.z ; if zz="" then do
tr "Serial ID Number `"z"' no longer in use; skipping." ; iterate i ; end
tr "Copying `"z"' as `"zz"_History' file."
address command "copy pfiles:who/histories/"z" "zz"_History"
end i
DONE:
se "n1Deleting `Glimpses/', `Banners/', and `Histories/' directories "
tr "from the `pfiles:who/' directory..."
address command "delete pfiles:who/glimpses/ all"
address command "delete pfiles:who/banners/ all"
address command "delete pfiles:who/histories/ all"
tr "n1Conversion complete!"
exit
BBSTEXT:
l4=BBSLINE(1,4);l5=BBSLINE(1,5);l107=BBSLINE(1,107);l903=BBSLINE(1,903)
l1066=BBSLINE(1,1066);fake=430;return
BBSLINE: procedure;arg ty,li;getuser 1402018+(ty*4)
ln=import(import(offset(x2c(d2x(result,8)),(li-1)*4),4),1024)
parse var ln ln'00'x .;return ln
SYNTAX:;ERROR:;IOERR:;e1=' Error: 'rc' ('errortext(rc)')'
e2=' Line: 'left(sigl,4)'File:';gu 1311992;a=result;gu 1311960;b=result;c='"'a||b'"';e2=e2' 'c;tr e1;tr e2;logentry e1;logentry e2
e=sourceline(sigl);do while e~='';e3='Source: 'left(e,37);tr e3;logentry e3;e=substr(e,38);end;bufferflush;exit
/** Last Edited: 15-Oct-95 ************************************************\
\****************************************** Frontiers BBS (716)/823-9892 **/